// msic function, not related to qq protocol

#ifndef _QQ_MISC_H_
#define _QQ_MISC_H_

#include <gtk/gtk.h>
#include "common.h"
#include "glib.h"
#include "qq.h"

GdkPixbuf * get_face_gdkpixbuf(int i);
struct contact_info *qq_duplicate_info(struct contact_info *info);

void qq_read_packet_b
(uint8 *buf, uint8 **cursor, int buflen,uint8 *b);

void qq_read_packet_w
(uint8 *buf, uint8 **cursor, int buflen,uint16 *w);

void qq_read_packet_dw
(uint8 *buf, uint8 **cursor, int buflen,uint32 *dw);

void qq_read_packet_data
(uint8 *buf, uint8 **cursor, int buflen, uint8 *data, int datalen);

void qq_create_packet_b
(uint8 *buf, uint8 **cursor, uint8 b);

void qq_create_packet_w
(uint8 *buf, uint8 **cursor, uint16 w);

void qq_create_packet_dw
(uint8 *buf, uint8 **cursor, uint32 dw);

void qq_create_packet_data
(uint8 *buf, uint8 **cursor, const uint8 *data, int datalen);

#endif
